var express = require('express');
var router = express.Router();
// var User = require('../model/user.model');


// /* GET users listing. */
// router.get('/', function(req, res, next) {
//   // res.send('respond with a resource');
//   const user = new User({name:'zhangsan'});
//   user.save().then(()=>res.send('数据保存成功'))
// });

var dataCtrl = require('../controlls/user.controlls');

router.post('/data',dataCtrl.create);
router.put('/data/:id',dataCtrl.update);
router.delete('/data/:id',dataCtrl.remove);
router.post('/list',dataCtrl.list);

module.exports = router;
